<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root">
        {{str}}
        <div @click="test">hhh</div>
        <input v-model="str" />
    </div>
    <script src="./index.js"></script>
    <script>
        const vm = new Vue({
            el: "#root",
            data () {
                return {
                    str: 123
                }
            },
            methods: {
                test() {
                    this.str = 56
                    console.log(this)
                }
            }
        });
    </script>
</body>
</html>